GATE CSE 2012
Q31.
Consider the following logical inferences. I1: If it rains then the cricket match will not be played. The cricket match was played. Inference: There was no rain. I2: If it rains then the cricket match will not be played. It did not rain. Inference: The cricket match was played. Which of the following is TRUE?Q32.
Suppose a circular queue of capacity (n-1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty areQ33.
The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with n discs isQ34.
Suppose R1(A, B) and R2(C, D) are two relation schemas. Let r1 and r2 be the corresponding relation instances. B is a foreign key that refers to C in R2. If data in r1 and r2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE?Q35.
Given the language L = {ab, aa, baa}, which of the following strings are in L*? 1) abaabaaabaa 2) aaaabaaaa 3) baaaaabaaaab 4) baaaaabaaQ36.
Consider the following relations A, B and C: How many tuples does the result of the following relational algebra expression contain? Assume that the schema of A\cupB is the same as that of A. (A\cup B)\bowtie _{A.Id \gt 40 \vee C.Id \lt 15}CQ37.
A list of n strings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation isQ38.
Consider the directed graph shown in the figure below. There are multiple shortest paths between vertices S and T. Which one will be reported by Dijkstra's shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex v is updated only when a strictly shorter path to v is discoveredQ39.
Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted. Consider the calling chain: Main \rightarrow A1 \rightarrow A2 \rightarrow A21 \rightarrow A1 The correct set of activation records along with their access links is given byQ40.
Consider the following relations A, B and C: How many tuples does the result of the following SQL query contain? SELECT A.Id FROM A WHERE A.Age > ALL (SELECT B.Age FROM B WHERE B.Name = 'Arun')